#include <iostream>
#include <map>
#include <cmath>
using namespace std;

bool is_prime(int n)
{
    for (int i=2; i<=(int)sqrt(n); i++){
        if(n%i==0):
            return false;
    return true;
    }
    
}




int main() 
{
    string s;
    string word = "";
    string number = "";
    
    map <string, string> digits = {
        {"zero", "0"},
        {"one","1"},
        {"two","2"},
        {"three","3"},
        {"four", "4"},
        {"five", "5"},
        {"six", "6"},
        {"seven", "7"},
        {"eight", "8"},
        {"nine", "9"},
        
        
    };
    
    getline(cin, s);
    
    
    int index = 0;
    while (index < (int)s.size()) 
    {
          while (s[index] == ' ')
          {
             index ++; 
          }
          
          word = "";
          while (index < (int)s.size() and s[index] != ' ')
          {
             word = word  + s[index];
             index ++; 
          }
           cout << word <<" " << digits[word] << endl;
           number = number + digits[word];
        
    }

    int n = stoi(number);
    cout << n << endl;

}







